package deviceScript

import "gitee.com/fierce_wolf/go-fox-edge-common/edgeEntity"

type ScriptEngineExecutor struct {
}

func (e *ScriptEngineExecutor) Exchange(routineKey string, deviceName string, manufacturer string, deviceType string, operateEntity *edgeEntity.OperateEntity, params map[string]interface{}, timeout int) (map[string]interface{}, error) {
	return ExchangeService.exchange(routineKey, deviceName, manufacturer, deviceType, operateEntity, params, timeout)
}

func (e *ScriptEngineExecutor) PublishPublish(routineKey string, deviceName string, manufacturer string, deviceType string, operateEntity *edgeEntity.OperateEntity, params map[string]interface{}, timeout int) error {
	return PublishService.publish(routineKey, deviceName, manufacturer, deviceType, operateEntity, params, timeout)
}

func (e *ScriptEngineExecutor) Decode(routineKey string, manufacturer string, deviceType string, operateEntityList []*edgeEntity.OperateEntity, recv interface{}, params map[string]interface{}) (map[string]interface{}, error) {
	return ReportService.Decode(routineKey, manufacturer, deviceType, operateEntityList, recv, params)
}
